<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/

$app->get('/', function () use ($app) {
    return $app->version();
});

$app->group(['middleware'=>'auth'], function () use ($app) {
    $app->group(['prefix' => '/v{version:\d+\.\d+}/supplier', 'namespace' => 'Supplier'], function () use ($app) {
		$app->post('loging', 'LoginController@loging');
		$app->post('view', 'SupplierController@view');
		$app->post('lists', 'SupplierController@mlist');
		$app->post('mapply', 'SupplierController@mapply');
		$app->post('save', 'SupplierController@save');
		$app->post('mpass', 'SupplierController@mpass');
	});
	$app->group(['prefix' => '/v{version:\d+\.\d+}/city', 'namespace' => 'Common'], function () use ($app) {
		$app->post('lists', 'CityController@lists');
	});
});


